package cn.tedu.boyou.acticle.mapper;

import cn.tedu.boyou.acticle.domain.Travel;
import cn.tedu.boyou.common.query.TravelQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List<Travel> selectForList(TravelQuery qo);

    List<Travel> selectHotReadTop3(Long destId);

    Travel selectTravelByDestId(Long destId);

    List<Travel> selectNewTravel(Long uid);

    int selectCountByAuthorId(Long uid);

    List<Travel> selectTravelByUserId(Long uid);

    List<Travel> selectForListByUserId(@Param("qo") TravelQuery qo, @Param("uid") Long uid);

}